eeprom: Add bus argument to eeprom_init()
authorMarek Vasut <[email protected]>
Tue, 10 Nov 2015 19:53:31 +0000 (20:53 +0100)
committerTom Rini <[email protected]>
Sun, 22 Nov 2015 02:50:26 +0000 (21:50 -0500)
commit354e3ed754fea744ff412b1e015b696db08320e3
treeb46abf0507aac3f67b8940660fd60cb2612bb828
parent1a37889b0ad084a740b4f785031d7ae9955d947b
eeprom: Add bus argument to eeprom_init()

Add bus argument to eeprom_init(), so that it can select
the I2C bus number on which the eeprom resides. Any negative
value of the $bus argument will preserve the old behavior.
This is in place so that old code does not randomly break.

Signed-off-by: Marek Vasut <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Heiko Schocher <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
[trini: Wrap i2c_set_bus_num() call with CONFIG_SYS_I2C test]
Signed-off-by: Tom Rini <[email protected]>
common/cmd_eeprom.c
common/env_eeprom.c
include/common.h